def print_hollow_square(size):
    for i in range(size):
        # 打印顶边和底边
        if i == 0 or i == size - 1:
            print(" * " * size)
        else:
            # 打印侧边，除了第一个和最后一个字符
            print(" * " + "   " * (size - 2) + " * ")


# 示例：绘制一个5x5的空心的正方形
print_hollow_square(5)